
#include "Game.h"

static unsigned int gu4AllSize = MEM_SIZE_GAME;
static unsigned int gu4AllocSize = 0;
static unsigned char* gpu1Buffer = gu1Buffer;

void* getMem(const unsigned int u4MemSize)
{
	void* vpMemPoint = NULL;	

	if (gu4AllSize < u4MemSize)
	{
		return NULL;
	}

	vpMemPoint = gpu1Buffer;
	gpu1Buffer += u4MemSize;
	gu4AllSize -= u4MemSize;
	gu4AllocSize += u4MemSize;

	return vpMemPoint;
}